package common

import "ws-demo-go/pkg/ws/common"

// IncompleteFrame 残缺帧类型，用于写入传输层的发送缓冲队列
type IncompleteFrame struct {
	Opcode  common.Opcode // 帧类型
	Payload []byte        // 载荷数据
}

var (
	PingFrame = &IncompleteFrame{Opcode: common.OpPing, Payload: []byte("")} // Ping 帧
	PongFrame = &IncompleteFrame{Opcode: common.OpPong, Payload: []byte("")} // Pong 帧
)

// SendChan 传输层的发送缓冲队列类型
type SendChan chan *IncompleteFrame
